package com.classtest.classtestdemo.controller;

import com.classtest.classtestdemo.bean.DbTest;
import com.classtest.classtestdemo.service.DbTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/test")
public class DbTestController {
    @Autowired
    DbTestService dbTestService;

    @RequestMapping(value = "/findAll",method = RequestMethod.GET)
    public List<DbTest> findAll(){
         return dbTestService.list();
    }
}
